@ECHO OFF
REM Begin to create the exported subdomain database.
REM It will clone the system database and subdomain service database.

REM Database [db0117022449] will be created.
mysql -uroot -ptoor < export-scripts.sql

REM Backup the final dump.
mysqldump -uroot -ptoor db0117022449 > db0117022449.dmp

REM If gzip is installed, compress the dump file.
gzip --keep --force -9 db0117022449.dmp

REM Empty the database after taking a backup using a temp database
REM mysql -uroot -ptoor -s "DROP DATABASE IF EXISTS db0117022449;"

PAUSE
EXIT
